import Cookies from 'js-cookie';
// import utils from '@/common/utils';

const TokenKey = 'vue3_token';

export function getToken() {
  return Cookies.get(TokenKey);
}

export function setToken(token, expires) {
  // if (process.env.NODE_ENV === 'production' && expires && typeof expires !== 'undefined')
  // if (!utils.isEmpty(expires)) return Cookies.set(TokenKey, token, { expires: expires });
  // else return Cookies.set(TokenKey, token);
  console.log(token, expires);
}

export function removeToken() {
  return Cookies.remove(TokenKey);
}
